3.27 \(\int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \, dx\)

Optimal. Leaf size=85 \[ -\frac {a^3 \sin ^3(c+d x)}{d}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {a^3 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {15 a^3 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {15 a^3 x}{8} \]

[Out]

15/8*a^3*x+4*a^3*sin(d*x+c)/d+15/8*a^3*cos(d*x+c)*sin(d*x+c)/d+1/4*a^3*cos(d*x+c)^3*sin(d*x+c)/d-a^3*sin(d*x+c
)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3791, 2637, 2635, 8, 2633} \[ -\frac {a^3 \sin ^3(c+d x)}{d}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {a^3 \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {15 a^3 \sin (c+d x) \cos (c+d x)}{8 d}+\frac {15 a^3 x}{8} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]

[Out]

(15*a^3*x)/8 + (4*a^3*Sin[c + d*x])/d + (15*a^3*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a^3*Cos[c + d*x]^3*Sin[c +
 d*x])/(4*d) - (a^3*Sin[c + d*x]^3)/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3791

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[Expand
Trig[(a + b*csc[e + f*x])^m*(d*csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0]
 && IGtQ[m, 0] && RationalQ[n]

Rubi steps

\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \, dx &=\int \left (a^3 \cos (c+d x)+3 a^3 \cos ^2(c+d x)+3 a^3 \cos ^3(c+d x)+a^3 \cos ^4(c+d x)\right ) \, dx\\ &=a^3 \int \cos (c+d x) \, dx+a^3 \int \cos ^4(c+d x) \, dx+\left (3 a^3\right ) \int \cos ^2(c+d x) \, dx+\left (3 a^3\right ) \int \cos ^3(c+d x) \, dx\\ &=\frac {a^3 \sin (c+d x)}{d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} \left (3 a^3\right ) \int \cos ^2(c+d x) \, dx+\frac {1}{2} \left (3 a^3\right ) \int 1 \, dx-\frac {\left (3 a^3\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {3 a^3 x}{2}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {15 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a^3 \sin ^3(c+d x)}{d}+\frac {1}{8} \left (3 a^3\right ) \int 1 \, dx\\ &=\frac {15 a^3 x}{8}+\frac {4 a^3 \sin (c+d x)}{d}+\frac {15 a^3 \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^3 \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a^3 \sin ^3(c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 51, normalized size = 0.60 \[ \frac {a^3 (104 \sin (c+d x)+32 \sin (2 (c+d x))+8 \sin (3 (c+d x))+\sin (4 (c+d x))+60 d x)}{32 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]

[Out]

(a^3*(60*d*x + 104*Sin[c + d*x] + 32*Sin[2*(c + d*x)] + 8*Sin[3*(c + d*x)] + Sin[4*(c + d*x)]))/(32*d)

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 63, normalized size = 0.74 \[ \frac {15 \, a^{3} d x + {\left (2 \, a^{3} \cos \left (d x + c\right )^{3} + 8 \, a^{3} \cos \left (d x + c\right )^{2} + 15 \, a^{3} \cos \left (d x + c\right ) + 24 \, a^{3}\right )} \sin \left (d x + c\right )}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/8*(15*a^3*d*x + (2*a^3*cos(d*x + c)^3 + 8*a^3*cos(d*x + c)^2 + 15*a^3*cos(d*x + c) + 24*a^3)*sin(d*x + c))/d

________________________________________________________________________________________

giac [A]  time = 0.69, size = 96, normalized size = 1.13 \[ \frac {15 \, {\left (d x + c\right )} a^{3} + \frac {2 \, {\left (15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 55 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 73 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 49 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{8 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="giac")

[Out]

1/8*(15*(d*x + c)*a^3 + 2*(15*a^3*tan(1/2*d*x + 1/2*c)^7 + 55*a^3*tan(1/2*d*x + 1/2*c)^5 + 73*a^3*tan(1/2*d*x
+ 1/2*c)^3 + 49*a^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d

________________________________________________________________________________________

maple [A]  time = 0.79, size = 100, normalized size = 1.18 \[ \frac {a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+a^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+3 a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\sin \left (d x +c \right ) a^{3}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(a+a*sec(d*x+c))^3,x)

[Out]

1/d*(a^3*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+a^3*(2+cos(d*x+c)^2)*sin(d*x+c)+3*a^3*(1
/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+sin(d*x+c)*a^3)

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 94, normalized size = 1.11 \[ -\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3} - {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 32 \, a^{3} \sin \left (d x + c\right )}{32 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/32*(32*(sin(d*x + c)^3 - 3*sin(d*x + c))*a^3 - (12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*a^3
- 24*(2*d*x + 2*c + sin(2*d*x + 2*c))*a^3 - 32*a^3*sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 4.17, size = 89, normalized size = 1.05 \[ \frac {15\,a^3\,x}{8}+\frac {\frac {15\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {55\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {73\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {49\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^4*(a + a/cos(c + d*x))^3,x)

[Out]

(15*a^3*x)/8 + ((73*a^3*tan(c/2 + (d*x)/2)^3)/4 + (55*a^3*tan(c/2 + (d*x)/2)^5)/4 + (15*a^3*tan(c/2 + (d*x)/2)
^7)/4 + (49*a^3*tan(c/2 + (d*x)/2))/4)/(d*(tan(c/2 + (d*x)/2)^2 + 1)^4)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(a+a*sec(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________